package org.eiahe.hr.attendance.service;

import org.eiahe.hr.attendance.domain.bo.OvertimeRecordBo;
import org.eiahe.hr.attendance.domain.vo.OvertimeRecordVo;
import org.ehe.common.mybatis.core.page.PageQuery;
import org.ehe.common.mybatis.core.page.TableDataInfo;

import java.time.LocalDate;
import java.util.Collection;
import java.util.List;

/**
 * 加班记录Service接口
 *
 * @author zhangnn
 */
public interface IOvertimeRecordService {

    /**
     * 查询加班记录
     */
    OvertimeRecordVo queryById(Long recordId);

    /**
     * 查询加班记录列表
     */
    TableDataInfo<OvertimeRecordVo> queryPageList(OvertimeRecordBo bo, PageQuery pageQuery);

    /**
     * 查询加班记录列表
     */
    List<OvertimeRecordVo> queryList(OvertimeRecordBo bo);

    /**
     * 新增加班记录(手动申请)
     */
    Boolean insertByBo(OvertimeRecordBo bo);

    /**
     * 修改加班记录
     */
    Boolean updateByBo(OvertimeRecordBo bo);

    /**
     * 校验并批量删除加班记录信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids);

    /**
     * 自动计算并生成加班记录
     *
     * @param employeeNo     工号
     * @param attendanceDate 考勤日期
     */
    void autoCalculateOvertime(String employeeNo, LocalDate attendanceDate);

    /**
     * 30天内加班异常
     * @param bo
     * @param pageQuery
     * @return
     */
    TableDataInfo<OvertimeRecordVo> listMonth(OvertimeRecordBo bo, PageQuery pageQuery);
}
